explain (analyze, buffers)  select emailrcpts.id, number_of_sends(emailrcpts.id, 30, 1) as sends from emailrcpts
  where ((lower(get_make(cid,vin,make_purchased))=lower('ohgoshnonotthebees!!!'))) and removed=false and active=true and cid=1784539
   and number_of_sends(emailrcpts.id, 30, 1) < 3 and  (bounce < 3) and (email is not null and length(email) > 0
   and not exists (select 1 from bogus_email_list where (cid=0 or cid=1784539) and email=emailrcpts.email))
   and  (not exists (select 1  from client_subscribed_products csp where background_id=emailrcpts.id and csp.cid=1784539 and csp.product_id=1 limit 1))
   and not exists (select 1 from opt_outs oo where oo.product_id = 1 and oo.sid = emailrcpts.id)
   and not exists (select 1 from opt_outs oo, opt_out_reasons oor where oo.reason = oor.id and oor.global = true and sid=emailrcpts.id)
    AND  (not exists (select 1 from bogus_name_list where (cid=1784539 or cid=0) and lower(emailrcpt_name(fname,lname)) = lower(name)) )
    AND not  ((fname is null or length(fname)=0) and (lname is null or length(lname)=0));